package jun.home.dailycost.web.decorator;

import javax.servlet.jsp.PageContext;

import jun.home.dailycost.domain.Category;

import org.displaytag.decorator.DisplaytagColumnDecorator;
import org.displaytag.exception.DecoratorException;
import org.displaytag.properties.MediaTypeEnum;

public class CategoryColumnDecorator implements DisplaytagColumnDecorator {

	@Override
	public Object decorate(Object arg0, PageContext arg1, MediaTypeEnum arg2)
			throws DecoratorException {
		if (arg0 != null) {
			return ((Category) arg0).getDesc();
		} else {
			return "";
		}
	}

}
